# Maintainer: Eli Schwartz <eschwartz@archlinux.org>

_pkgname=fissix
pkgname=python-fissix
pkgver=21.11.13
pkgrel=2
pkgdesc="Fork of lib2to3 with patch for Python issue33983 support"
arch=('any')
url="https://github.com/jreese/${_pkgname}"
license=('PSF')
depends=('python-appdirs')
makedepends=('python-build' 'python-installer' 'python-flit-core')
checkdepends=('python-pytest' 'python-tests')
source=(https://pypi.python.org/packages/source/f/$_pkgname/$_pkgname-$pkgver.tar.gz)
sha256sums=('496a51b86afb4c64cf15cfed38a0f3a371f300b298c962c881e33620f076a514')
b2sums=('cf63756b79b3f4f2442952e1077f4538f43a5cb6f151f700371af9bb8b7be45c16acce9834819bcc0861dd070b161423a5539d6cc59b65eee25f57634bc57b88')

build(){
  cd ${_pkgname}-${pkgver}

  python -m build --wheel --no-isolation
}

check() {
  cd ${_pkgname}-${pkgver}

  python -m pytest --verbose fissix/tests
}

package() {
  cd ${_pkgname}-${pkgver}

  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
